﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Web;

namespace CRM.Api.Filters
{
    /// <summary>
    /// 定义标识对象的基本功能
    /// </summary>
    public class APIIdentity : IIdentity
    {       
        /// <summary>
        /// 构造
        /// </summary>
        /// <param name="name">用户名</param>
        public APIIdentity(string name)
        {
            Name = name;
        }

        /// <summary>
        /// 获取所使用的身份验证的类型
        /// </summary>
        public string AuthenticationType
        {
            get
            {
                return "bmcw";
            }
        }

        /// <summary>
        /// 获取一个值，该值指示是否验证了用户
        /// </summary>
        public bool IsAuthenticated
        {
            get
            {
                return true;
            }
        }

        /// <summary>
        /// 获取当前用户的名称
        /// </summary>
        public string Name
        {
            get;
        }
    }
}